/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __F5FFAE3B_53B0_49c7_ACF5_E6090ABAB478__
#define __F5FFAE3B_53B0_49c7_ACF5_E6090ABAB478__

#include "../tools/head.h"

/////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos_box
{
    class i_callback;
}

namespace xos
{
    // 
    // dir_monitor_impl
    // 
    class dir_monitor_impl : public xos_stl::mem_item< release_impl< dir_monitor_impl >, thread_lock >,
        public i_dir_monitor
    {
    public:
        typedef release_impl< dir_monitor_impl > T;

    public:
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //

        static int get_xos_item_data( ITEM_DATA*& item_ptr );

    public:
        dir_monitor_impl();
        ~dir_monitor_impl();

    public:
        int init();
        int term();

    public:
        // 
        // set callback
        // 
        int set_callback( xos_box::i_callback * lpCallback, f_runnable lpRunnableObj );

        // 
        // set dir to monitor
        // 
        int set_dir( const char * lpszPath );
    };
} // xos

#endif // __F5FFAE3B_53B0_49c7_ACF5_E6090ABAB478__
